import request from '@/utils/request.js'

// 获取线索管理数据
export const apiGetClueList = params => request.get('tienchin/clue/list', { params })

// 删除线索管理数据
export const apiDelClueList = ids => request.delete(`tienchin/clue/${ids}`)

// 线索管理导出xlsx
export const apiDeriveXlsx = data => request.post('tienchin/course/export', data, {responseType: 'blob'})

// 获取渠道来源数据
export const apiChannelList = () => request.get('tienchin/clue/channels')

// 获取线索状态数据
export const apiStatusList = () => request.get('system/dict/data/type/clue_status')

// 增加线索数据
export const apiAddClue = data => request.post('tienchin/clue', data)

// 获取活动信息需要的id
export const apiEditPrepare = id => request.get(`tienchin/clue/summary/${id}`) 

// 获取活动信息
export const apiActivityList = id => request.get(`tienchin/clue/activity/${id}`)

// 修改的信息
export const apiEditList = params => request.put(`tienchin/clue`, params)

// 分配线索归属部门信息
export const apiGetDepartment = () => request.get('system/dept/treeselect')

// 获取分配给的数据
export const apiGetGiveList = id => request.get(`tienchin/clue/users/${id}`)

// 确定分配按钮
export const apiSetGiveList = params => request.post('tienchin/assignment', params)
